﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MoneyManagerNET.Model
{
    public static class StockInvestmentExtensions
    {
        //----------------------
        //---IStockInvestment---
        //----------------------
        public static decimal GetValue(this IStockInvestment stock){return stock.CurrentPrice * stock.StockCount;}
        public static decimal GetGainLoss(this IStockInvestment stock){return (stock.PurchasePrice - stock.CurrentPrice) * stock.StockCount - stock.Commission; }
    }
}
